package com.lysj.website.auth.domain;


import com.lysj.website.common.spring.base.BaseEntity;
import com.lysj.website.common.validation.annotation.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

/**
 * @author zk
 * @description 角色表
 * @create 2018-07-25 15:10:47
 **/
@Data
@Entity
@EqualsAndHashCode(callSuper = true)
@Table(name = "lysj_auth_role")
public class Role extends BaseEntity {


    @NotBlank(message = "请填写角色名")
    private String name;//角色名

    private Boolean defaultRole;//是否为注册默认角色


    @Transient
    private List<Permission> permissions;//角色拥有的权限


}